import request from "../../utils/request";

// 获取用户列表
export function GetUser(data) {
  return request({
    url: `/back/user/queryrole?pageSize=${data.pageSize}&pageNum=${data.pageNum}`,
    method: 'GET',
    data: data
  })
}
// 查询指定用户
export function QueryUser(data) {
  return request({
    url: `/back/user/query?username=${data.username}&rname=${data.rname}&pageSize=${data.pageSize}&pageNum=${data.pageNum}`,
    method: 'GET',
    data: data
  })
}
//删除用户
export function DeleteUser(data) {
  return request({
    url: `/back/user/delete?id=${data.id}`,
    method: 'DELETE',
    data: data
  })
}
// //导出用户信息
// // http://10.2.4.21:8088/back/user/excel/export?id=1&id=2&id=3&id=4&id=5&id=7
// export function ExportUser(data) {
//   const userIds = data.map(id => `id=${id}`).join('&');
//   return request({
//     url: `/back/user/excel/export?${userIds}`,
//     method: 'GET',
//   })
// }